<?php
/*
 * @ https://EasyToYou.eu - IonCube v11 Decoder Online
 * @ PHP 7.2 & 7.3
 * @ Decoder version: 1.1.6
 * @ Release: 10/08/2022
 */

// Decoded file for php version 71.
namespace app\admin\model;

class SellingProfit extends \app\BaseModel
{
    protected $name = "longbing_card_selling_profit";
    protected static function init()
    {
    }
    public function profitList($dis, $page = 10)
    {
        $data = \think\facade\Db::name($this->name)->alias("a")->leftJoin("longbing_card_user b", "a.user_id = b.id")->leftJoin("longbing_card_user_info c", "a.user_id = c.fans_id")->where($dis)->field(["a.*", "b.nickName", "c.name"])->order("a.total_profit desc", "a.id decs")->paginate($page)->toArray();
        return $data;
    }
    public function configUpdate($dis, $data)
    {
        $data["update_time"] = time();
        $res = self::where($dis)->update($data);
        return $res;
    }
}

?>